package com.roadjava.rbac.service;

import com.roadjava.rbac.security.AESUtil;
import org.springframework.stereotype.Service;

@Service
public class DecryptionService {

    private final String secretKey;

    public DecryptionService() {
        this.secretKey = "AAAABBBBCCCCDDDD";
        // 请替换为你的实际密钥
    }

    public String decryptPassword(String encryptedPassword) throws Exception {
        return AESUtil.decrypt(encryptedPassword, secretKey);
    }
}
